<template>
  <Card title="供应商信息" :style="{ paddingBottom: tags.length > 0 ? '6rpx' : '26rpx' }">
    <DescriptionsItem label="名称">{{ info.name }}</DescriptionsItem>
    <DescriptionsItem label="标签">
      <template v-if="tags && tags.length > 0">
        <SupplierTag :dict="dictEnums" v-for="(tag, index) in tags" :tag="tag" :key="index" />
      </template>
      <template v-else>-</template>
    </DescriptionsItem>
  </Card>
</template>
<script>
import Card from "./card.vue";
import DescriptionsItem from "./descriptionsItem.vue";
import SupplierTag from './supplierTag.vue'
export default {
  data() {
    return {};
  },
  props: {
    info: {
      type: Object,
      default: () => {
        return {};
      },
    },
    dictEnums: {
      type: Object,
      default: () => {
        return {};
      },
    }
  },
  computed: {
    tags() {
      return this.info.tags ? this.info.tags.split(',') : []
    }
  },
  components: {
    Card,
    SupplierTag,
    DescriptionsItem,
  },

  methods: {},
};
</script>

<style lang="scss" scoped></style>
